package licode.unisop.unilite.dp;

/**
 * 分页查询基类
 *
 * @author WR
 * @since 2016/7/9 15:55
 */
public class PageReq {
    public static Integer DEF_CURRENT = 1;
    public static Integer DEF_PAGE_SIZE = 10;

    private Integer current;
    private Integer pageSize;

    public Integer getCurrent() {
        if (null == current || current < 1) {
            return DEF_CURRENT;
        }
        return current;
    }

    public void setCurrent(Integer current) {
        this.current = current;
    }

    public Integer getPageSize() {
        if (null == pageSize || pageSize < 1) {
            return DEF_PAGE_SIZE;
        }
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }
}
